package com.pojo;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY) // 当children为空时不序列化该字段
public class Department {
    private Integer id;
    private String name;
    private Integer managerId;
    private Integer parentId;
    private LocalDateTime createTime;

    // 树形结构专用字段（不参与数据库存储）
    private List<Department> children;
}